<template>
  <div class="todo-main">
    <TodoItem :todoList="todoList" ref="item"></TodoItem>
  </div>
</template>

<script>
import TodoItem from "./TodoItem.vue";
export default {
  name: "TodoList", //这里必须为字符串
  components: { TodoItem },
  mounted() {
    //list
    this.$refs.item.$on("changeChecked", this.changeChecked);
    this.$refs.item.$on("handDelete", this.handDelete);
  },
  props: ["todoList"],
};
</script>

<style scoped>
/*main*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>>